#pragma once
#include "Stdafx.h"
typedef int LongBool;
typedef void *Pointer;
typedef char *PChar;
typedef bool Boolean;
typedef int Integer;
typedef char* String;
typedef float Single;
typedef void procedure;
typedef long longword;
typedef float *PSingle;
typedef int Dword;
typedef short Word;
//typedef int DWORD;
typedef int SizeUInt;
#define SizeOf sizeof;
typedef void **PPointer;
typedef unsigned int* PtrUInt;
typedef long Int64;
typedef byte Byte;
typedef int Int32;
typedef int* PInt32;
typedef int* PDword;
typedef char Char;
typedef HANDLE Handle;
typedef int SizeInt;
typedef long* PLongBool;
typedef unsigned UInt;
typedef HANDLE THandle;

template <typename T>
class TFPGList
{
public:
	std::list<T>* vList;
	Integer vCount;
	T* Last;
public:
	procedure Create();
	procedure Destroy();
	Integer Add(T vItem);
	Integer Remove(const T Item);
	procedure Clear();
	TFPGList();
	T* GetLast();
	Boolean IsLast();
	T GetItem(Integer vIndex);
};

template <typename TKey, typename TData>
class TFPGMap
{
public:
	typedef std::map<TKey,TData> TMap;
	TMap vMap;
	Integer Count;
public:
	TKey GetKey(Integer vIndex);
	procedure PutKey(TKey vKey,Integer vIndex);
	procedure Create();
	procedure Destroy();
	procedure Remove(TKey vKey);
};
/*
void DebugLn(PChar vStr);

void DebugLnEnter(PChar vStr);

void DebugLnExit();*/
